﻿<Activity mc:Ignorable="sap sap2010 sads" x:Class="SalesPortal.Activities.SequentialNumberGuessWorkflow"
 xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities"
 xmlns:local="clr-namespace:SalesPortal.Activities"
 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
 xmlns:mca="clr-namespace:Microsoft.CSharp.Activities;assembly=System.Activities"
 xmlns:sads="http://schemas.microsoft.com/netfx/2010/xaml/activities/debugger"
 xmlns:sap="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation"
 xmlns:sap2010="http://schemas.microsoft.com/netfx/2010/xaml/activities/presentation"
 xmlns:scg="clr-namespace:System.Collections.Generic;assembly=mscorlib"
 xmlns:sco="clr-namespace:System.Collections.ObjectModel;assembly=mscorlib"
 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  <x:Members>
    <x:Property Name="Turns" Type="OutArgument(x:Int32)" />
    <x:Property Name="MaxNumber" Type="InArgument(x:Int32)" />
  </x:Members>
  <sap2010:ExpressionActivityEditor.ExpressionActivityEditor>C#</sap2010:ExpressionActivityEditor.ExpressionActivityEditor>
  <sap2010:WorkflowViewState.IdRef>SalesPortal.Activities.SequentialNumberGuessWorkflow_1</sap2010:WorkflowViewState.IdRef>
  <TextExpression.NamespacesForImplementation>
    <sco:Collection x:TypeArguments="x:String">
      <x:String>System</x:String>
      <x:String>System.Collections.Generic</x:String>
      <x:String>System.Data</x:String>
      <x:String>System.Linq</x:String>
      <x:String>System.Text</x:String>
    </sco:Collection>
  </TextExpression.NamespacesForImplementation>
  <TextExpression.ReferencesForImplementation>
    <sco:Collection x:TypeArguments="AssemblyReference">
      <AssemblyReference>Microsoft.CSharp</AssemblyReference>
      <AssemblyReference>System</AssemblyReference>
      <AssemblyReference>System.Activities</AssemblyReference>
      <AssemblyReference>System.Core</AssemblyReference>
      <AssemblyReference>System.Data</AssemblyReference>
      <AssemblyReference>System.Runtime.Serialization</AssemblyReference>
      <AssemblyReference>System.ServiceModel</AssemblyReference>
      <AssemblyReference>System.ServiceModel.Activities</AssemblyReference>
      <AssemblyReference>System.Xaml</AssemblyReference>
      <AssemblyReference>System.Xml</AssemblyReference>
      <AssemblyReference>System.Xml.Linq</AssemblyReference>
      <AssemblyReference>mscorlib</AssemblyReference>
      <AssemblyReference>SalesPortal.Activities</AssemblyReference>
    </sco:Collection>
  </TextExpression.ReferencesForImplementation>
  <Sequence sap2010:WorkflowViewState.IdRef="Sequence_1">
    <Sequence.Variables>
      <Variable x:TypeArguments="x:Int32" Name="Guess" />
      <Variable x:TypeArguments="x:Int32" Name="Target" />
    </Sequence.Variables>
    <Assign sap2010:WorkflowViewState.IdRef="Assign_1">
      <Assign.To>
        <OutArgument x:TypeArguments="x:Int32">
          <mca:CSharpReference x:TypeArguments="x:Int32">Target</mca:CSharpReference>
        </OutArgument>
      </Assign.To>
      <Assign.Value>
        <InArgument x:TypeArguments="x:Int32">
          <mca:CSharpValue x:TypeArguments="x:Int32">new System.Random().Next(1, MaxNumber + 1)</mca:CSharpValue>
        </InArgument>
      </Assign.Value>
    </Assign>
    <DoWhile sap2010:WorkflowViewState.IdRef="DoWhile_1">
      <DoWhile.Condition>
        <mca:CSharpValue x:TypeArguments="x:Boolean">Guess != Target</mca:CSharpValue>
      </DoWhile.Condition>
      <Sequence sap2010:WorkflowViewState.IdRef="Sequence_2">
        <local:Prompt BookmarkName="EnterGuess" sap2010:WorkflowViewState.IdRef="Prompt_1">
          <local:Prompt.Result>
            <OutArgument x:TypeArguments="x:Int32">
              <mca:CSharpReference x:TypeArguments="x:Int32">Guess</mca:CSharpReference>
            </OutArgument>
          </local:Prompt.Result>
          <local:Prompt.Text>
            <InArgument x:TypeArguments="x:String">
              <mca:CSharpValue x:TypeArguments="x:String">"Please enter a number between 1 and " + MaxNumber</mca:CSharpValue>
            </InArgument>
          </local:Prompt.Text>
        </local:Prompt>
        <Assign sap2010:WorkflowViewState.IdRef="Assign_2">
          <Assign.To>
            <OutArgument x:TypeArguments="x:Int32">
              <mca:CSharpReference x:TypeArguments="x:Int32">Turns</mca:CSharpReference>
            </OutArgument>
          </Assign.To>
          <Assign.Value>
            <InArgument x:TypeArguments="x:Int32">
              <mca:CSharpValue x:TypeArguments="x:Int32">Turns + 1</mca:CSharpValue>
            </InArgument>
          </Assign.Value>
        </Assign>
        <If sap2010:WorkflowViewState.IdRef="If_2">
          <If.Condition>
            <InArgument x:TypeArguments="x:Boolean">
              <mca:CSharpValue x:TypeArguments="x:Boolean">Guess != Target</mca:CSharpValue>
            </InArgument>
          </If.Condition>
          <If.Then>
            <If sap2010:WorkflowViewState.IdRef="If_1">
              <If.Condition>
                <InArgument x:TypeArguments="x:Boolean">
                  <mca:CSharpValue x:TypeArguments="x:Boolean">Guess &lt; Target</mca:CSharpValue>
                </InArgument>
              </If.Condition>
              <If.Then>
                <WriteLine sap2010:WorkflowViewState.IdRef="WriteLine_1" Text="Your guess is too low." />
              </If.Then>
              <If.Else>
                <WriteLine sap2010:WorkflowViewState.IdRef="WriteLine_2" Text="Your guess is too high." />
              </If.Else>
            </If>
          </If.Then>
        </If>
      </Sequence>
    </DoWhile>
    <sads:DebugSymbol.Symbol>d1FEOlxDb2RlcGxleFxTYWxlc1BvcnRhbFxTYWxlc1BvcnRhbC5BY3Rpdml0aWVzXFNlcXVlbnRpYWxOdW1iZXJHdWVzc1dvcmtmbG93LnhhbWwWLANzDgIBATEFPA4CATA9BXEPAgECOQs5cgIBNjQLNFYCATE/CT9XAgErQQdwEgIBA0IJTRgCAR9OCVkSAgEUWglvDgIBBEIkQjACASpKD0p/AgElRQ9FWQIBIFYPVlUCARpRD1FZAgEVXQ9dXQIBBWENbRICAQpkE2RjAgELaBFoagIBEmsRa2sCARBoT2hnAgETa09raAIBEQ==</sads:DebugSymbol.Symbol>
  </Sequence>
  <sap2010:WorkflowViewState.ViewStateManager>
    <sap2010:ViewStateManager>
      <sap2010:ViewStateData Id="Assign_1" sap:VirtualizedContainerService.HintSize="464,62" />
      <sap2010:ViewStateData Id="Prompt_1" sap:VirtualizedContainerService.HintSize="589,22" />
      <sap2010:ViewStateData Id="Assign_2" sap:VirtualizedContainerService.HintSize="589,62" />
      <sap2010:ViewStateData Id="WriteLine_1" sap:VirtualizedContainerService.HintSize="211,62" />
      <sap2010:ViewStateData Id="WriteLine_2" sap:VirtualizedContainerService.HintSize="211,62" />
      <sap2010:ViewStateData Id="If_1" sap:VirtualizedContainerService.HintSize="464,212" />
      <sap2010:ViewStateData Id="If_2" sap:VirtualizedContainerService.HintSize="589,362" />
      <sap2010:ViewStateData Id="Sequence_2" sap:VirtualizedContainerService.HintSize="611,650">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="DoWhile_1" sap:VirtualizedContainerService.HintSize="637,814" />
      <sap2010:ViewStateData Id="Sequence_1" sap:VirtualizedContainerService.HintSize="486,450">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="SalesPortal.Activities.SequentialNumberGuessWorkflow_1" sap:VirtualizedContainerService.HintSize="526,530" />
    </sap2010:ViewStateManager>
  </sap2010:WorkflowViewState.ViewStateManager>
</Activity>